import request from "@/utils/request";

// 仓库 -删除
export function warehouseDelete(params) {
  return request({
    url: "/system/warehouse/delete",
    method: "post",
    data: params,
  });
}
//仓库-获取详情
export function warehouseGetDetail(id) {
  return request({
    url: "/system/warehouse/detail/" + id,
    method: "get",
  });
}

//仓库-获取列表
export function warehouseGetList(params) {
  return request({
    url: "/system/warehouse/list",
    method: "post",
    data: params,
  });
}
//仓库-保存
export function warehouseSave(params) {
  return request({
    url: "/system/warehouse/save",
    method: "post",
    data: params,
  });
}

//获取仓库下拉筛选数据
export function warehouseGetFilter(params) {
  return request({
    url: "/system/warehouse/filter",
    method: "post",
    data: params,
  });
}

// 库区 -删除
export function areaDelete(params) {
  return request({
    url: "/system/area/delete",
    method: "post",
    data: params,
  });
}

//库区-获取列表
export function areaGetList(params) {
  return request({
    url: "/system/area/list",
    method: "post",
    data: params,
  });
}
//库区-保存
export function areaSave(params) {
  return request({
    url: "/system/area/save",
    method: "post",
    data: params,
  });
}

//库区下拉筛选数据
export function areaGetFilter(params) {
  return request({
    url: "/system/area/filter",
    method: "post",
    data: params,
  });
}

//库位-删除
export function locationDelete(params) {
  return request({
    url: "/system/location/delete",
    method: "post",
    data: params,
  });
}
//库位-获取列表
export function getLocationList(params) {
  return request({
    url: "/system/location/list",
    method: "post",
    data: params,
  });
}

//库位-保存
export function locationSave(params) {
  return request({
    url: "/system/location/save",
    method: "post",
    data: params,
  });
}

//获取关联SKU列表
export function getLocationSkuList(params) {
  return request({
    url: "/system/location/skuList",
    method: "post",
    data: params,
  });
}
//供应商-删除
export function vendorDelete(params) {
  return request({
    url: "/system/vendor/delete",
    method: "post",
    data: params,
  });
}
//供应商-列表
export function getVendorList(params) {
  return request({
    url: "/system/vendor/list",
    method: "post",
    data: params,
  });
}
//供应商-保存
export function vendorSave(params) {
  return request({
    url: "/system/vendor/save",
    method: "post",
    data: params,
  });
}

//快递管理-删除
export function expressDelete(params) {
  return request({
    url: "/system/express/delete",
    method: "post",
    data: params,
  });
}
//快递管理-列表
export function getExpressList(params) {
  return request({
    url: "/system/express/list",
    method: "post",
    data: params,
  });
}

//快递管理 -保存
export function expressSave(params) {
  return request({
    url: "/system/express/save",
    method: "post",
    data: params,
  });
}
//快递面单-删除
export function waybillDelete(params) {
  return request({
    url: "/system/waybill/delete",
    method: "post",
    data: params,
  });
}
//快递面单-列表
export function getWaybillList(params) {
  return request({
    url: "/system/waybill/list",
    method: "post",
    data: params,
  });
}
//快递面单保存
export function waybillSave(params) {
  return request({
    url: "/system/waybill/save",
    method: "post",
    data: params,
  });
}
//商品--删除
export function skuDelete(params) {
  return request({
    url: "/system/sku/delete",
    method: "post",
    data: params,
  });
}
//商品-列表
export function getSkuList(params) {
  return request({
    url: "/system/sku/list",
    method: "post",
    data: params,
  });
}
//商品-保存
export function skuSave(params) {
  return request({
    url: "/system/sku/save",
    method: "post",
    data: params,
  });
}

//查询可添加库位列表
export function getSkuAddLocationList(params) {
  return request({
    url: "/system/sku/addLocationList",
    method: "post",
    data: params,
  });
}

//erp商品明细列表 （关联erp系统sku）
export function getSkuDetailListByErpSku(params) {
  return request({
    url: "/system/skuDetail/listByErpSku",
    method: "post",
    data: params,
  });
}
//获取商品详情
export function getSkuDetail(id) {
  return request({
    url: "/system/sku/detail/" + id,
    method: "get",
  });
}
//商品分类-列表
export function getSkuClassifyList(params) {
  return request({
    url: "/system/skuClassify/list",
    method: "post",
    data: params,
  });
}
//商品分类-移动
export function getSkuClassifyMove(params) {
  return request({
    url: "/system/skuClassify/move",
    method: "post",
    data: params,
  });
}
//商品分类-删除
export function getSkuClassifyDelete(params) {
  return request({
    url: "/system/skuClassify/delete",
    method: "post",
    data: params,
  });
}
//商品分类-保存
export function skuClassifySave(params) {
  return request({
    url: "/system/skuClassify/save",
    method: "post",
    data: params,
  });
}
//商品属性-删除
export function getSkuAttrDelete(params) {
  return request({
    url: "/system/skuAttr/delete",
    method: "post",
    data: params,
  });
}
//商品属性-列表
export function getSkuAttrList(params) {
  return request({
    url: "/system/skuAttr/list",
    method: "post",
    data: params,
  });
}
//商品属性-保存
export function skuAttrSave(params) {
  return request({
    url: "/system/skuAttr/save",
    method: "post",
    data: params,
  });
}
//线下采购单 -列表
export function getB2bPurchaseHeaderList(params) {
  return request({
    url: "/system/b2bPurchaseHeader/list",
    method: "post",
    data: params,
  });
}
//线下采购单 -详情
export function getB2bPurchaseHeaderDetail(id) {
  return request({
    url: "/system/b2bPurchaseHeader/detail/" + id,
    method: "post",
  });
}
//线下采购单 -删除
export function b2bPurchaseHeaderDelete(params) {
  return request({
    url: "/system/b2bPurchaseHeader/delete",
    method: "post",
    data: params,
  });
}
//线下采购单 -商品弹框列表
export function getB2bPurchaseHeaderAddSkuList(params) {
  return request({
    url: "/system/b2bPurchaseHeader/addSkuList",
    method: "post",
    data: params,
  });
}
//线下采购单-保存
export function skuB2bPurchaseHeaderSave(params) {
  return request({
    url: "/system/b2bPurchaseHeader/save",
    method: "post",
    data: params,
  });
}

//现在采购单-提交
export function skuB2bPurchaseHeaderCommit(params) {
  return request({
    url: "/system/b2bPurchaseHeader/commit",
    method: "post",
    data: params,
  });
}

//供应商筛选
export function getVendorFilter(params) {
  return request({
    url: "/system/vendor/filter",
    method: "post",
    data: params,
  });
}

//（b2b）线下入库单-列表
export function getB2bReceiptList(params) {
  return request({
    url: "/system/b2bReceipt/list",
    method: "post",
    data: params,
  });
}
//（b2b）线下入库单-详情
export function getB2bReceiptDetail(id) {
  return request({
    url: "/system/b2bReceipt/detail/" + id,
    method: "post",
  });
}
//（b2b）线下入库单-保存
export function b2bReceiptSave(params) {
  return request({
    url: "/system/b2bReceipt/save",
    method: "post",
    data: params,
  });
}
//（b2b）线下入库单 -删除
export function b2bReceiptDelete(params) {
  return request({
    url: "/system/b2bReceipt/delete",
    method: "post",
    data: params,
  });
}
//b2b线下收货
export function getReceiptQcB2bReceiptList(params) {
  return request({
    url: "/system/receiptQc/b2bReceiptList",
    method: "post",
    data: params,
  });
}

//商品分类-下拉数据
export function getSkuClassifyFilter(params) {
  return request({
    url: "/system/skuClassify/filter",
    method: "post",
    data: params,
  });
}
//商品属性-下拉数据
export function getSkuAttrFilter(params) {
  return request({
    url: "/system/skuAttr/filter",
    method: "post",
    data: params,
  });
}
//b2b入库明细列表
export function getReceiptHistoryList(params) {
  return request({
    url: "/system/b2bReceipt/receiptHistoryList",
    method: "post",
    data: params,
  });
}
//查询b2b收货详情
export function getQueryB2BReceiptInfo(params) {
  return request({
    url: "/system/receiptQc/queryB2BReceiptInfo",
    method: "post",
    data: params,
  });
}
//b2b线下收货 确认
export function saveReceiptQcConfirmB2BReceipt(params) {
  return request({
    url: "/system/receiptQc/confirmB2BReceipt",
    method: "post",
    data: params,
  });
}
//b2b线下收货 保存上架指标
export function savePutawayPercent(params) {
  return request({
    url: "/system/receiptQc/savePutawayPercent",
    method: "post",
    data: params,
  });
}


//收货记录-列表
export function receiptRecordList(params) {
  return request({
    url: "/system/receiptQc/receiptRecordList",
    method: "post",
    data: params,
  });
}

//收货记录-明细
export function receiptRecordDetail(params) {
  return request({
    url: "/system/receiptQc/receiptRecordDetail",
    method: "post",
    data: params,
  });
}


//线上出库单-列表
export function getOnLineList(params) {
  return request({
    url: "/system/out/order/getOnLineList",
    method: "post",
    data: params,
  });
}
//手工出具单列表
export function getHandWorkList(params) {
  return request({
    url: "/system/out/order/getHandWorkList",
    method: "post",
    data: params,
  });
}
//保存 手工出库单
export function addHandWork(params) {
  return request({
    url: "/system/out/order/addHandWork",
    method: "post",
    data: params,
  });
}
//新建手工出库单 -商品列表
export function locationInventoryGetSkuList(params) {
  return request({
    url: "/system/locationInventory/getSkuList",
    method: "post",
    data: params,
  });
}
//新增手工波次
export function batchAddBatch(params) {
  return request({
    url: "/system/batch/addBatch",
    method: "post",
    data: params,
  });
}
//波次列表
export function getBatchList(params) {
  return request({
    url: "/system/batch/getList",
    method: "post",
    data: params,
  });
}
//查询波次拣货详细信息
export function getBatchDetail(id) {
  return request({
    url: "/system/batch/" + id,
    method: "get",
  });
}

//上架列表
export function getReceiptPutawayList(params) {
  return request({
    url: "/system/receiptPutaway/list",
    method: "post",
    data: params,
  });
}
//获取库位下拉数据
export function getLocationFilter(params) {
  return request({
    url: "/system/location/filter",
    method: "post",
    data: params,
  });
}
//查询波次策略列表
export function batchPloyGetList(params) {
  return request({
    url: "/system/batch/ploy/getList",
    method: "post",
    data: params,
  });
}
//保存波次策略
export function batchPloySaveBatchPloy(params) {
  return request({
    url: "/system/batch/ploy/saveBatchPloy",
    method: "post",
    data: params,
  });
}
//查波次策略详情 /system/batch/ploy/getInfo
export function batchPloyGetInfo(params) {
  return request({
    url: "/system/batch/ploy/getInfo",
    method: "get",
    data: params,
  });
}
//波次策略 启用 禁用
export function updateBatchPloyStatus(params) {
  return request({
    url: "/system/batch/ploy/updateBatchPloyStatus",
    method: "post",
    data: params,
  });
}
//查询称重出库列表
export function getOutWeighList(params) {
  return request({
    url: "/system/out/order/getOutWeighList",
    method: "post",
    data: params,
  });
}
//线上出库明细列表
export function getOnLineDetailList(params) {
  return request({
    url: "/system/out/order/getOnLineDetailList",
    method: "post",
    data: params,
  });
}
//查询手工出库单明细列表
export function getHandWorkDetailList(params) {
  return request({
    url: "/system/out/order/getHandWorkDetailList",
    method: "post",
    data: params,
  });
}
//线下采购退货 列表
export function getB2bPurchaseReturnList(params) {
  return request({
    url: "/system/b2bPurchaseReturn/list",
    method: "post",
    data: params,
  });
}
//线下采购退货 提交
export function saveAndCommitB2BReturn(params) {
  return request({
    url: "/system/b2bPurchaseReturn/saveAndCommitB2BReturn",
    method: "post",
    data: params,
  });
}
//线下采购退货 可退货列表
export function getReturnList(params) {
  return request({
    url: "/system/b2bPurchaseReturn/returnList",
    method: "post",
    data: params,
  });
}
//根据关联的采购单id查询采购明细
export function getPurchaseDetailList(params) {
  return request({
    url: "/system/b2bPurchaseReturn/purchaseDetailList",
    method: "post",
    data: params,
  });
}
//拣货单号查询拣货详情
export function getPickDetailByCode(params) {
  return request({
    url: "/system/pick/package/getDetailByCode",
    method: "get",
    data: params,
  });
}
//校验当前商品是否属于当前拣货单
export function checkPickPackageAndSku(params) {
  return request({
    url: "/system/pick/package/checkPickPackageAndSku",
    method: "get",
    data: params,
  });
}
//线下采购退货 详情
export function getB2bPurchaseReturnDetail(id) {
  return request({
    url: "/system/b2bPurchaseReturn/detail/" + id,
    method: "get",
  });
}
//库存统计
export function getSkuLocationInventoryList(params) {
  return request({
    url: "/system/locationInventory/getInventoryStatisticsList",
    method: "post",
    data: params,
  });
}
//商品统计
export function getSkuStatisticsList(params) {
  return request({
    url: "/system/locationInventory/getSkuStatisticsList",
    method: "post",
    data: params,
  });
}
//库位统计
export function getLocationStatisticsList(params) {
  return request({
    url: "/system/locationInventory/getLocationStatisticsList",
    method: "post",
    data: params,
  });
}

//商品库存预警列表
export function getSkuInventoryWarnList(params) {
  return request({
    url: "/system/skuInventoryWarn/list",
    method: "post",
    data: params,
  });
}
//打印商品标签
export function printSkuLabel(params) {
  return request({
    url: "/system/b2bReceipt/printSkuLabel",
    method: "post",
    data: params,
  });
}
//获取省市区
export function getPcaDataTreeList() {
  return request({
    url: "/system/pca/getPcaDataTreeList",
    method: "get",
  });
}

//查询出库单的快递信息
export function getKuaidiCreateBmOrder(params) {
  return request({
    url: "/system/kuaidi/createBmOrder",
    method: "get",
    data: params,
  });
}
//更新打印拣货单次数
export function updateBatchPrintNum(params) {
  return request({
    url: "/system/batch/updateBatchPrintNum",
    method: "post",
    data: params,
  });
}
//线上退货明细列表
export function getReturnHistoryList(params) {
  return request({
    url: "/system/erpReceipt/returnHistoryList",
    method: "post",
    data: params,
  });
}
//线上入库明细列表
export function getErpReceiptHistoryList(params) {
  return request({
    url: "/system/erpReceipt/receiptHistoryList",
    method: "post",
    data: params,
  });
}
//线上采购管理列表
export function getErpPurchaseHeaderList(params) {
  return request({
    url: "/system/erpPurchaseHeader/list",
    method: "post",
    data: params,
  });
}
//生成采购单
export function saveGenerator(params) {
  return request({
    url: "/system/erpPurchaseHeader/generator",
    method: "post",
    data: params,
  });
}
//线上采购审核列表
export function getErpPurchaseAuditList(params) {
  return request({
    url: "/system/erpPurchaseAudit/list",
    method: "post",
    data: params,
  });
}
//线上采购审核 审核功能
export function erpPurchaseAudit(params) {
  return request({
    url: "/system/erpPurchaseAudit/audit",
    method: "post",
    data: params,
  });
}
//线上质检退货列表
export function getQcReturnlist(params) {
  return request({
    url: "/system/erpPurchaseReturn/qcReturnlist",
    method: "post",
    data: params,
  });
}
//线上 库存退货
export function getInventoryReturnlist(params) {
  return request({
    url: "/system/erpPurchaseReturn/inventoryReturnlist",
    method: "post",
    data: params,
  });
}

//添加erp可退货列表
export function getErpReturnList(params) {
  return request({
    url: "/system/erpPurchaseReturn/returnList",
    method: "post",
    data: params,
  });
}
//保存线上erp退货
export function saveAndCommitErpReturn(params) {
  return request({
    url: "/system/erpPurchaseReturn/saveAndCommitErpReturn",
    method: "post",
    data: params,
  });
}
//获取打印配置
export function getPrintConfigList(params) {
  return request({
    url: "/system/print/config/list",
    method: "post",
    data: params,
  });
}
//查询打印纸张
export function getPaperSizeList(params) {
  return request({
    url: "/system/print/config/getPaperSizeList",
    method: "get",
    data: params,
  });
}

//更新打印配置状态 或 打印机
export function updatePrintConfig(params) {
  return request({
    url: "/system/print/config/updatePrintConfig",
    method: "post",
    data: params,
  });
}

//保存打印配置
export function savePrintConfig(params) {
  return request({
    url: "/system/print/config/savePrintConfig",
    method: "post",
    data: params,
  });
}
//删除打印配置
export function deletePrintConfig(id) {
  return request({
    url: "/system/print/config/remove/" + id,
    method: "post",
  });
}

//员工账号列表
export function getEmployeeList(query) {
  return request({
    url: "/monitor/online/list",
    method: "get",
    params: query,
  });
}

//出库单列表（待打印订单、已打印订单、已发货订单）
export function getSelectOutOrderList(params) {
  return request({
    url: "/system/out/order/selectOutOrderList",
    method: "post",
    data: params,
  });
}
//出库单列表（已分配波次订单）
export function getOutOrderAllocationList(params) {
  return request({
    url: "/system/out/order/getOutOrderAllocationList",
    method: "post",
    data: params,
  });
}

// 查询快递单列表（根据出库单id或者波次id）
export function getSelectBmOrderList(params) {
  return request({
    url: "/system/kuaidi/selectBmOrderList",
    method: "post",
    data: params,
  });
}

//查询分拣单列表
export function selectSortingOrderList(params) {
  return request({
    url: "/system/out/order/selectSortingOrderList",
    method: "post",
    data: params,
  });
}
//查询拣单列表
export function selectPickOrderList(params) {
  return request({
    url: "/system/out/order/selectPickOrderList",
    method: "post",
    data: params,
  });
}

//查询是否自动生成波次
export function getBatchConfigGetInfo() {
  return request({
    url: "/system/batch/ploy/config/getInfo",
    method: "get",
  });
}
//更新自动生成波次状态
export function saveBatchConfigUpdateStatus(params) {
  return request({
    url: "/system/batch/ploy/config/updateStatus",
    method: "post",
    data: params,
  });
}
//生成波次
export function saveBatchCreateBatch(params) {
  return request({
    url: "/system/batch/createBatch",
    method: "post",
    data: params,
  });
}
//查询最新的分配订单波次
export function getNewBatchList() {
  return request({
    url: "/system/batch/getNewBatchList",
    method: "get",
  });
}
//更新出库单打印次数
export function updateOutOrderPrintNum(params) {
  return request({
    url: "/system/out/order/updateOutOrderPrintNum",
    method: "post",
    data: params,
  });
}

//打印入库单
export function getB2bReceiptPrint(params) {
  return request({
    url: "/system/b2bReceipt/print",
    method: "post",
    data: params,
  });
}

// 选择人员的弹框
export function selectPeople(params) {
  return request({
    url: "/system/user/getUserSimpleList",
    method: "post",
    data: params,
  });
}

// 打包-订单详情接口
export function orderDetail(params) {
  return request({
    url: "/system/out/order/getOutOrderSimpleList",
    method: "get",
    data: params,
  });
}

// 打包-分配人员
export function allocPerson(params) {
  return request({
    url: "/system/out/order/packageAlloc",
    method: "post",
    data: params,
  });
}

// 打包-确认打包
export function surePecked(params) {
  return request({
    url: "/system/pick/package/submitPackageInfo",
    method: "post",
    data: params,
  });
}

//线下退货管理-获取列表
export function customerReturnList(params) {
  return request({
    url: "/system/b2bReceipt/customerReturnList",
    method: "post",
    data: params,
  });
}

//查询客服看到的出单快递信息列表
export function getAsExpressList(params) {
  return request({
    url: "/system/kuaidi/wh/transfer/asExpressList",
    method: "get",
    data: params,
  });
}

// 查询当前出库单的快递信息
export function createBmOrderByThird(params) {
  return request({
    url: "/system/kuaidi/createBmOrderByThird",
    method: "get",
    data: params,
  });
}
